home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 06 - 1990 / 06.01 Jan 90 / DLL Source Code / SampIII.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-08-27  |  1.2 KB  |  46 lines  |  [TEXT/MPS ]

  1. /************************************************/
  2. /*                  Sample DLL's                */
  3. /*       Copyright © Vincent Parsons 1989.      */
  4. /************************************************/
  5. /*    DLL code for MPW C 3.0 or THINK C 4.0     */
  6. /*       with Excel for the Macintosh 2.2       */
  7. /*             and Microsoft C 5.1              */
  8. /*          with Excel for Windows 2.1          */
  9. /************************************************/
  10. /* SampIII is an example of two data type I     */
  11. /* inputs and one data type I output.  The      */
  12. /* output is the product of the two type I      */
  13. /* inputs.                                      */
  14. /************************************************/
  15. /*   =REGISTER("SampDLLs","SampIII","III")      */
  16. /*   for both the Mac and the PC.               */
  17. /************************************************/
  18.  
  19. #include "DLL.h"
  20.  
  21. #if applec
  22. #include <Types.h>
  23.  
  24. #elif MSDOS
  25. #include <windows.h>
  26. #endif
  27.  
  28. #if THINK_C
  29. pascal short main(short u1, short u2);    /* prototype */
  30.  
  31. pascal short main(u1, u2)
  32. short u1;
  33. short u2;
  34.  
  35. #elif applec
  36. pascal short SampIII(short u1, short u2)
  37.  
  38. #elif MSDOS
  39. short far pascal SampIII(short u1, short u2)
  40. #endif
  41. {
  42.     return ( u1 * u2 );
  43. }
  44.  
  45. /************************************************/
  46.